:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --accent-color: #e74c3c;
    --text-color: #2c3e50;
    --bg-color: #f9f9f9;
    --card-bg: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --primary-color: #61dafb;
    --secondary-color: #4ade80;
    --accent-color: #f87171;
    --text-color: #f1f1f1;
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
}

canvas {
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
}

header {
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    width: 100%;
    top: 0;
    background-color: var(--bg-color);
    backdrop-filter: blur(10px);
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    /* Yazının altındaki çizgiyi kaldır */
}

.logo span {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Alt çizgi ekleme */
.logo::after {
    content: '';
    position: absolute;
    bottom: 0;
    /* Alt kısıma yerleştir */
    left: 0;
    width: 0;
    /* Başlangıçta gizli */
    height: 2px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease-in-out;
}

/* Hover efekti ile alt çizgi genişlemesi */
.logo:hover::after {
    width: 100%;
    /* Hover durumunda çizgi genişlesin */
}


nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
}

nav a:hover {
    color: var(--primary-color);
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--primary-color);
}

.toggles {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.theme-toggle,
.lang-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    font-size: 1.2rem;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition);
}

.theme-toggle:hover,
.lang-toggle:hover {
    background-color: rgba(var(--primary-color-rgb, 52, 152, 219), 0.1);
    color: var(--primary-color);
}

.current-lang {
    font-size: 0.9rem;
    font-weight: 600;
}

[data-theme="dark"] header {
    background-color: var(--bg-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .nav-link {
    color: var(--text-color);
}

[data-theme="dark"] .theme-toggle,
[data-theme="dark"] .lang-toggle {
    color: var(--text-color);
}

[data-theme="dark"] .theme-toggle:hover,
[data-theme="dark"] .lang-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Progress Bar Styles */
.progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    width: 0%;
    transition: width 0.1s ease-out;
}

main {
    margin-top: 70px;
    padding: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

section {
    margin-bottom: 4rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

h2 {
    margin-bottom: 1.5rem;
    font-size: 2rem;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: calc(100vh - 70px);
    padding: 2rem 0;
}

.hero-content {
    width: 60%;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.cta-button {
    padding: 0.8rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
}

.cta-button:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.profile-image {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 20%;
    box-shadow: var(--shadow);
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.skill-card {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: var(--transition);
    z-index: 1;
}

.skill-card:hover::before {
    opacity: 0.1;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.skill-card i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: var(--card-bg);
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-content h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.project-content p {
    color: var(--text-color);
    margin-bottom: 1rem;
    line-height: 1.6;
    flex-grow: 1;
}

.project-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: center;
    border-radius: 8px 8px 0 0;
    transition: all 0.3s ease;
    max-width: 100%;
    display: block;
    backface-visibility: hidden;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.project-image.portrait-image {
    height: 280px;
    object-fit: contain;
    object-position: center;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.05), rgba(46, 204, 113, 0.05));
}

[data-theme="dark"] .project-image.portrait-image {
    background: linear-gradient(135deg, rgba(97, 218, 251, 0.08), rgba(74, 222, 128, 0.08));
}

.project-image.landscape-image {
    height: 250px;
    object-fit: contain;
    object-position: center;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.03), rgba(46, 204, 113, 0.03));
}

[data-theme="dark"] .project-image.landscape-image {
    background: linear-gradient(135deg, rgba(97, 218, 251, 0.05), rgba(74, 222, 128, 0.05));
}

.project-image.tall-portrait {
    height: 300px;
    object-position: top;
}

.project-card:hover .project-image {
    transform: scale(1.05);
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.tag {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.tag:hover {
    filter: brightness(1.2);
    transition: 0.3s;
}

.btn-local-deployment {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
    cursor: default;
    pointer-events: none;
}


.project-links {
    display: flex;
    gap: 1rem;
}

.project-links a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
}

#ongoing-projects {
    margin-top: 4rem;
}

#ongoing-projects .project-card {
    border: 2px solid var(--primary-color);
}

/* Publications Section */
.publications-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
}

.publication-card {
    display: flex;
    gap: 2rem;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-left: 4px solid var(--primary-color);
}

.publication-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.publication-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), #2ecc71);
    border-radius: 12px;
    font-size: 1.8rem;
    color: white;
}

.publication-content {
    flex: 1;
}

.publication-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: var(--text-color);
    line-height: 1.4;
}

.publication-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.publication-year,
.publication-type {
    padding: 0.3rem 0.8rem;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
}

[data-theme="dark"] .publication-year,
[data-theme="dark"] .publication-type {
    background: rgba(97, 218, 251, 0.15);
}

.publication-description {
    color: var(--secondary-text);
    line-height: 1.6;
    margin-bottom: 1.2rem;
}

.publication-card .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    max-width: 800px;
}

.form-group:last-child {
    grid-column: span 2;
}

.contact-note {
    font-size: 0.8rem;
    color: var(--text-color);
    opacity: 0.8;
    margin-top: 0.8rem;
    text-align: center;
}

input,
textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: var(--card-bg);
    color: var(--text-color);
}

textarea {
    min-height: 150px;
}

footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--card-bg);
    margin-top: 2rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.social-links a {
    color: var(--text-color);
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color);
}

.loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform-origin: left;
    transform: scaleX(0);
    transition: transform 0.3s ease;
    z-index: 1000;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: slideIn 0.6s ease forwards;
}

.btn {
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: none;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-outline {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

@media (max-width: 768px) {
    /* Mobilde section'ları direkt görünür yap */
    section {
        opacity: 1 !important;
        transform: translateY(0) !important;
    }

    .hero {
        flex-direction: column-reverse;
        text-align: center;
        gap: 2rem;
    }

    .hero-content {
        width: 100%;
    }

    .skills-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .publication-card {
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem;
    }

    .publication-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .publication-content h3 {
        font-size: 1.1rem;
    }

    .contact-form {
        grid-template-columns: 1fr;
    }

    .form-group:last-child {
        grid-column: span 1;
    }

    nav ul {
        display: none;
    }

    .mobile-menu {
        display: block;
        font-size: 1.5rem;
    }
}